<template>
  <div class="VSwitch">
    <h1>This is an VSwitch page</h1>

    <a-switch
      checked-children="开"
      un-checked-children="关"
      default-checked
      @change="onChange"
    />
    <br />
    <a-switch checked-children="是" un-checked-children="否" default-checked />
    <br />
    <a-switch checked-children="1" un-checked-children="0" />
    <br />
    <a-switch default-checked>
      <a-icon slot="checkedChildren" type="check" />
      <a-icon slot="unCheckedChildren" type="close" />
    </a-switch>
  </div>
</template>
<script>
export default {
  data() {
    return {};
  },
  methods: {
    onChange(checked) {
      console.log(`a-switch to ${checked}`);
    }
  }
};
</script>
